<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black" />
		<title>计划列表</title>
		<link href="css/mui.min.css" rel="stylesheet" />
		<style>
			.mui-table-title {
				padding: 3px 0;
				font-size: 1.1em;
				width: 90%;
			}

			.mui-text-line {
				width: 82%;
				font-size: .7em;
				padding-left: 1%;
			}
			.mui-bar{
				-webkit-box-shadow: 0 0 0px rgba(0,0,0,.85);
			    box-shadow: 0 0 0px rgba(0,0,0,.85);
				    height: 50px;
			}
			.mui-title{
				line-height: 50px;
			    color: #fff;
			}
			.mui-icon-back:before, .mui-icon-left-nav:before {
			    content: '\e471';
			    color: #fff;
			}
			.mui-icon-plusempty:before {
			    content: '\e468';
			    color: #fff;
			}
			.mui-bar-nav~.mui-content .mui-pull-top-pocket {
			    top: 65px !important;
			}
		</style>
	</head>
	<body style="padding-top: 72px; box-sizing: border-box;">
		<div style="height: 23px;width: 100%;background: #464646;position: fixed;top: 0;"></div>
		<header class="mui-bar mui-bar-nav" style="background: #464646;top: 22px;">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">计划列表</h1>
			<a class="mui-icon mui-icon-plusempty mui-pull-right" id="addplan"></a>
		</header>
		<!-- <div style="height: 200px; width: 100%; background: red;"></div> -->
		<script src="js/common.js"></script>
		<script src="../js/func/hui.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/mui.js"></script>
		<script src="js/vue.min.js"></script>
		<script src="js/config.js"></script>
		<script>
			mui.init({
				subpages: [{
					url: 'plan.html?pid=' + GetQueryString("pid") + '&uid=' + GetQueryString("uid"),
					id: 'plan.html',
					styles: {
						top: '75px',
						bottom: '0px',
					}
				}]
			})
			
			mui.plusReady(function(){
				var self=plus.webview.all();
				var old_back = mui.back;
				mui.back = function() {
					var wobj = plus.webview.getWebviewById("main_New.html");//注意 HBuilder 是   1.html 的 ID  你如果1.html 有ID   要替换掉HBuilder，
					
					old_back()
				}
			});
			
			
			/** 打开计划添加界面 */
			var powerid = GetQueryString("pid"); //  'eb8a565cf451420e9c7e13a0511211e3';
			var uid = GetQueryString("uid");
			console.log(uid);
				/** 打开计划添加界面 */
				mui(".mui-bar").on("tap", "#addplan", function() {
					var btnArray = [{
						title: "时间计划"
					}, {
						title: "条件计划"
					}];
					plus.nativeUI.actionSheet({
						cancel: "取消",
						buttons: btnArray
					}, function(e) {
						var index = e.index;
						 
						switch (index) {
							case 1:
								hui.open("./plan_interval.html?powerid=" + powerid + "&uid=" + uid, {}, true, {});
								break;
							case 2:
								hui.open("./plan_condition.html?powerid=" + powerid + "&uid=" + uid, {}, true, {});
								break;
						}
					});
				})
			/* function openUrl(url) {
				mui.openWindow({
					url: url + powerid
				});
			} */
		</script>
	</body>
</html>
